#include "gameinfo.h"
#include <sstream>



void stGameInfo::CopyTo(gameinfo_proto::GameInfo& gameinfo) const
{
    gameinfo.set_game(this->game);
    gameinfo.set_agency_id(this->agency_id);
    gameinfo.set_lauch_url(this->lauch_url);
    gameinfo.set_state(this->state);
    gameinfo.set_display_mode(static_cast<gameinfo_proto::GameDisplayMode>(this->display_mode));
}
void stGameInfo::CopyFrom(const gameinfo_proto::GameInfo& gameinfo)
{
    this->game = gameinfo.game();
    this->agency_id = gameinfo.agency_id();
    this->lauch_url = gameinfo.lauch_url();
    this->state = gameinfo.state();
    this->display_mode = gameinfo.display_mode();
}

stGameInfo& stGameInfo::operator = (const stGameInfo& that)
{
    this->game = that.game;
    this->agency_id = that.agency_id;
    this->lauch_url = that.lauch_url;
    this->state = that.state;
    this->display_mode = that.display_mode;
    return *this;
}

stGameInfo& stGameInfo::operator = (stGameInfo&& that)
{
    this->game = std::move(that.game);
    this->agency_id = std::move(that.agency_id);
    this->lauch_url = std::move(that.lauch_url);
    this->state = std::move(that.state);
    this->display_mode = std::move(that.display_mode);
    return *this;
}

std::string stGameInfo::ToString() const
{
    std::stringstream ss;
    ss << "{"
        << "game:" << this->game << ","
        << "agency_id:" << this->agency_id << ","
        << "lauch_url:" << this->lauch_url << ","
        << "state:" << this->state << ","
        << "display_mode:" << this->display_mode << ","
    << "}";
    return ss.str();
}










